#-------------------------------------------------------------------
# Project Invasion of the aliens 
# name game.py
# purpose main game loop
#
# authors Chris L'Heureux, Tyler Plante, Jackson Morse
# main author Chris L'Heureux
#
# created 12/3/12
# Copyright (C) Jackson M
# License New BSD\
#------------------------------------------------------------------  
import pygame, math, sys, random

class Bow():
     def __init__(self, speed, position, heading, screenSize):
        self.surfaces = []
        self.surfaces += [pygame.image.load("rsc/Bow/Bow.png")]
        self.frame = 0
        self.maxFrame = len(self.surfaces)-1
        self.surface = self.surfaces[self.frame]
        self.surface = pygame.transform.scale(self.surface, [5, 5])
        self.rect = self.surface.get_rect()
        self.place(position)
        self.notBroken = True
        self.damage = 10
        self.ammo = 1000
        self.screenWidth = screenSize[0]
        self.screenHeight = screenSize[1]
        self.radius = self.rect.width/2     
    


	def Do_Damage(self, other):
        if (self.rect.right > other.rect.left 
            and self.rect.left < other.rect.right):
            if (self.rect.bottom > other.rect.top and 
                self.rect.top < other.rect.bottom):
                if (self.distToPoint(other.rect.center)
                    < self.radius + other.radius):
					skeleton.life -= 100
					Imp.life -= 80
					Monkey.life -= 70
					Fish.life -= 50
					Bat.life -= 40 
					Boss_Demon -= 20
					Boss_Shark -= 20
					Boss_Hydra.life -= 20
					Boss_Snake.life -= 20
					Boss_Spider.life -= 20
					
					
             
	def  __str__(self):
        return "I'm a Sword " + str(self.rect.center) 
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		